home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
bbs
/
lord2b7.zip
/
CASTLE2.REF
< prev
next >
Wrap
Text File
|
1997-05-26
|
8KB
|
427 lines
;note to .ref masters:
;replace castle2 with something else to use this .ref for other dwellings
;this .ref uses no long term vars, instead it makes its own data file - this
;means upgrading the game will not make people 'lose ownership' of their
;stuff.
@#STABLES
;lets them warp to a view places
@offmap
@do moveback
@show
`r0`c `r1 The Stables `r0
`0"Greetings, s&sir! Where can we drop you off today?" `2a smartly dressed
youth asks.
@do `v01 is 1
@do write
`x`x
@choice
Sosen Village
Stonepass Lodge
Portown
I'll stay here, thanks
@if response not 4 then do
@begin
@show
`\`\ `0"We shall leave at once!" he shouts importantly.
`k `2A few bumps later you arrive - ah, traveling in style is so much fun!
`0"I bid you a goodday s&sir, please travel safely."
`2Looks like you are on your own.
`k
@if responce is 1 then do
@begin
;Sosen village
@do x is 38
@do y is 5
@do map is 456
@end
@if responce is 2 then do
@begin
;Stonepass Lodge
@do x is 40
@do y is 11
@do map is 880
@end
@if responce is 3 then do
@begin
;Porttown
@do x is 43
@do y is 16
@do map is 956
@end
@loadmap &map
@end
@drawmap
@update
@#HEALME
;free heal
@offmap
@do moveback
@show
`r0`c `r1 The Healers `r0
`2The good doctor looks you over for wounds carefully.
`%YOU ARE COMPLETEY HEALED.
`k
@do `p02 is `p03
@drawmap
@update
@#TOWER
;Tower in the castle
@DO SAYBAR
`2The tower on this castle is not ready yet.
@do moveback
@#doorguard
@do moveback
@label startg
;guy who owns on it pushes against the door guard symbol. This lets him
;control the password to gain entrance to the castle, as well as sell it
;back or transfer ownership.
@if castle2.dat exist false then do
@begin
@do saybar
`0"You have 5 minutes to vacate this castle!" `2the guard barks.
@closescript
@end
@readfile castle2.dat
`p20
`s01
@
;load owner and current password
@if `p20 not &playernum then do
@begin
@do saybar
You wave to the door guard, nice of him to let you in.
@closescript
@end
@busy
@do `v01 is 1 ;set default choice to 1
@show
`r0`c `r1 Instructing your servants `r0
`2The huge doorguard snaps to attention when he sees you are going to
address him.
@do write
`x`x
@choice
Set password to gain entrance (currently is `0`s01`%)
Ownership options
Leave
@
@if responce is 2 then do
@begin
@show
`r0`c `r1 Ownership Options `r0
`2You retrieve your deed and carefully look it over.
@do `v01 is 1
@do write
`x`x
@choice
Transfer deed to someone else
Sell property back to the bank for `$10000`%.
Do nothing of the sort
@if response is 1 then do
@begin
@show
`\`\ `2Transfer to whom?
@chooseplayer `p20
@if `p20 is 0 then do
@begin
@show
`2You decide to keep your domain - for now.`\`\`k
@do goto startg
@end
@do `s02 is getname `p20
@show
`2 Are you sure you wish to give your castle to `0`s02`2?
@do write
`x`x
@choice
Yes
Not on your life.
@if responce is 2 then do
@begin
@show
`\`\ `2You decide to keep your domain - for now.`\`\`k
@do goto startg
@end
@do delete castle2.dat
@writefile castle2.dat
`p20
`s01
0
0
0
0
@writefile mail\mail`p20.dat
`0Business note:
`2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
`0 `n`2 has transferred ownership of Castle Coldrake to you.
Password to enter will remain `0"`s01"`2 unless
`2you come by and change it.
@do addlog
`0`n`2 has given `%Castle Coldrake`2 to `0`s02`2!
@routine seperate in gametxt.ref
@show
`\`\ `2Deed transfered. Oh well - it was fun while it lasted.`\`\`k
@do goto done
@end
@if response is 2 then do
@begin
@show
`\`\`2 Are you sure you wish to sell your castle back to the bank?`\
@do `v01 is 1
@do write
`x`x
@choice
Yes
Not on your life.
@if responce is 2 then do
@begin
@show
`\`\ `2You decide to keep your domain - for now.`\`\`k
@do goto startg
@end
@do delete castle2.dat
@do money + 10000
@show
`\`\ `%CASTLE SOLD!`2`\`\`k
@do addlog
`0`n`2 has sold `%Castle Coldrake`2 back to the bank!
@routine seperate in gametxt.ref
@do goto done
@end
@do goto startg
@end
@if responce is 1 then do
@begin
@do write
`\`\ `0"And the new password, s&sir?" `2(enter `4NONE`2 for no access to anyone)`\ `2Password:`x
@do readstring 40 `s01 `s01
@do `p20 is length `s01
@if `p20 < 2 then do
@begin
@show
`\`\ `2You decide the current password is ok.`\`\`k
@do goto startg
@end
@do delete castle2.dat
@writefile castle2.dat
&playernum
`s01
0
0
0
0
@show
`\`\ `0"Yes s&sir, I will not forget it!" `2the guard promises.`\`\`k
@do goto startg
@end
@drawmap
@update
@#sign
@do moveback
@if castle2.dat exist false then do
@begin
@do saybar
Castle Coldrake - For sale cheap, enquire inside.
@end
@if castle2.dat exist true then do
@begin
@readfile castle2.dat
`p20
`s01
@
@do `s01 is getname `p20
@do saybar
`2Property of `0`s01`2.
@end
@#enter
@do moveback
@offmap
@if castle2.dat exist false then do
@begin
@show
`r0`c `r1 `%For Sale `r0
`2Castle Coldrake was once a magnificient structure that housed many of
the royal families.
Buy now and recieve the following bonuses:
`0* `2A private carriage service! With drop off points in `0Porttown`2
and `0Sosen Village`2!
`0* `2Your very own physician on the grounds!
`2The asking price is `$$20,000`2.
@do `v01 is 1
@do write
`x`x
@choice
>&money 19999 Purchase it.
<&money 20000 Sigh wistfully and leave since you don't have enough.
>&money 19999 Leave.
@
@if responce is 1 then do
@begin
@if castle2.dat exist true then do
@begin
@show
`\`\ `2Oh crap! Someone bought it while you were thinking about it. You
will regret your snail like thinking for the rest of your days.`\`\`k
@do goto done
@end
@writefile castle2.dat
&playernum
NONE
0
0
0
0
@do money - 20000
@do addlog
`0`n `2buys `%Castle Coldrake`2!
@routine seperate in gametxt.ref
@show
`r0`c `r1 `%Why hello there, landowner! `r0
`\`2 Nice job! You now own this castle!
`2Enjoy your new home.`\`\`k
@end
@label done
@drawmap
@update
@closescript
@end
@readfile castle2.dat
`p20
`s01
@
@do `p21 is deleted `p20
@if `p21 is 1 then do
@begin
;owner got deleted!!! Lets put it up for sale again.
@do delete castle2.dat
@do addlog
`%Castle Coldrake`2 is put on the market today.
@routine seperate in gametxt.ref
;run script again
@do goto enter
@end
@if `p20 not &playernum then do
@begin
@do `s02 is getname `p20
@do upcase `s01
@if `s01 is NONE then do
@begin
@show
`r0`c `r1 None shall pass `r0
`2You pound on the door for some time before you get an answer.
`0"Master `s02`0 has declared that `4NO`0 visitors shall be allowed!" `2a
voice calls from behind the wall.
`4Ouch!
`k
@do goto done
@end
@show
`r0`c `r1 Stand and unfold thyself `r0
`2 A head pops over the gate. `0"Halt, you! What business have you with
my lord and master, `%`s02`0?" `2the door guard asks.
@do write
`x`x
@do `v01 is 1
@choice
Offer an explanation.
Visit later.
@if response is 1 then do
@begin
@do write
`\`\ `2Say what? :`x
@do readstring 40 NIL `s03
@do upcase `s03
@do upcase `s01
@if `s03 is `s01 then do
@begin
@show
`\`\ `0"Welcome to `%Castle Coldrake`0,"`2 the guard smiles as he opens the gate.`\`\`k
@do goto letmein
@end
@writefile mail\mail`p20.dat
`0Castle Coldrake Reports:
`2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
`0 `n`2 attempted to sweet talk the guard by saying
`0"`s03"`2. `2He was `bNOT`2 allowed in.
@show
`\`\ `2The guard doesn't look too interested.`\`\`k
@do goto done
@end
@do goto done
@end
;let him in
@label letmein
@do x is 41
@do y is 17
@do map is 80
@loadmap 80
@do goto done
@#done